<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0" />
    <link rel="stylesheet" type="text/css" href="./reset.css">
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script type="text/javascript" src="./js/rem.js"></script>
    <title>Document</title>
</head>
<style type="text/css" media="screen">
    .index-wrapper {
        width: 100%;
        height: 100%;
        background: rgb(194, 23, 43);
    }
    .content{
        position: relative;
        width: 100%;
        height: 100%;
        /*background: url(./image/Sketch003.jpg) no-repeat;
        background-size: cover;
        background-position: center 0;*/
    }
    .index-wrapper img {
        display: block;
        position: absolute;
        width: 100%;
       /* height: 100%;*/
    }
    .index-wrapper .c-btn {
        position: absolute;
        width: 2.5rem;
        top:5.5rem;
        left: 0.9rem;
    }
    .index-wrapper .c-btn img {
        display: block;
        position: absolute;
        top: -0.2rem;
        left: -0.4rem;
        width: 0.8rem;
        height: 0.9rem;
    }
    .index-wrapper a {
        display: block;
        width: 2rem;
        height: 0.5rem;
        border-radius: 8px;
        border: 4px solid rgb(249, 196, 112);
        text-align: center;
        line-height: 0.5rem;
        color: #fff;
        font-weight: 600;
        font-size: 18px;
    }
    .mask {
        display: none;
        position: fixed;
        width: 100%;
        height: 100%;
        background: #000;
        opacity: 0.8;
        /*background: url(./image/Sketch009.jpg) no-repeat;
        background-size: cover;
        background-position:center 0;*/
    }
</style>
<body>
    <div class="index-wrapper" id="wrapper">
        <img id="img" src="./image/Sketch003.jpg">
        <div class="content">
            <div class="c-btn">
              <img src="./image/index-sz.png" alt="">
              <a href="./luckDraw.html" >马上采办年货</a>
            </div>
            <div class="mask" id="mask">
                <img src="./image/Sketch009.png" alt="">
            </div>
        </div>
    </div>
</body>
<script type="text/javascript">
// if (isWeiXin()) {
//     $('#mask').show()
// }
// //判断是否是微信浏览器的函数
// function isWeiXin(){
//   //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息，这个属性可以用来判断浏览器类型
//   var ua = window.navigator.userAgent.toLowerCase();
//   //通过正则表达式匹配ua中是否含有MicroMessenger字符串
//   if(ua.match(/MicroMessenger/i) == 'micromessenger'){
//   return true;
//   }else{
//   return false;
//   }
// }
var os = window.navigator.userAgent.toLowerCase();
var weixin = os.indexOf('micromessenger');
// var height_one = $('#wrapper').height()
// var height_two = $('#img').height()
// if (height_one > height_two) {
//     $('#mask').css('height', height_one)
// } else {
//     $('#mask').css('height', height_two)
// }
if (weixin > -1) {
    $('#mask').show()
}
</script>
</html>